﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;


namespace CNCSoft.ErpApps.TMS
{

    public partial class frmPrintPreview : Form
    {

        private string strReportFile = "";
        private ReportDocument rptDoc;

        public frmPrintPreview()
        {
            InitializeComponent();
        }

        public frmPrintPreview(string m_reportfile)
        {
            InitializeComponent();
            strReportFile = m_reportfile;
        }


        public frmPrintPreview(ReportDocument m_rptDoc )
        {
            InitializeComponent();
            rptDoc = m_rptDoc;
        }

        
        private void frmPrintPreview_Load(object sender, EventArgs e)
        {
            try
            {
                CRViewer.ReportSource = rptDoc;
                this.WindowState = FormWindowState.Maximized  ;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "ConfigureCrystalReports");
            }
        }

 
      


    }
}
